import JsDataStore from './JsDataStore'
import environment from '@ohos.file.environment';

export class JsStandardPaths {

  path(type: string) {
    if (type == "DIRECTORY_DOWNLOADS") {
      return environment.getUserDownloadDir();
    } else if (type == "DIRECTORY_DOCUMENTS") {
      return environment.getUserDocumentDir();
    } else if (type == "DIRECTORY_DESKTOP") {
      return environment.getUserDesktopDir();
    } else if (type == "DIRECTORY_CACHE") {
      let dirs = JsDataStore.getApplicationDirs();
      return dirs.cacheDir;
    } else if (type == "DIRECTORY_TEMP") {
      let dirs = JsDataStore.getApplicationDirs();
      return dirs.tempDir;
    } else if (type == "DIRECTORY_BUNDLE") {
      let dirs = JsDataStore.getApplicationDirs();
      return dirs.bundleCodeDir;
    } else if (type == "DIRECTORY_FILES") {
      let dirs = JsDataStore.getApplicationDirs();
      return dirs.filesDir;
    } else if (type == "DIRECTORY_MUSIC") {

    } else if (type == "DIRECTORY_MOVIES") {

    } else if (type == "DIRECTORY_PICTURES") {

    }
    return "";
  }
}
